﻿using cnFederal.FaCode;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace cnFederal.Masterpages
{
    public partial class Admin : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
         
            AdminLinks.Visible = UserIdentity.Autenticated;
           
            if (UserIdentity.Autenticated)
                LinkButtonLogin.Text= "Sign out";
            else
                LinkButtonLogin.PostBackUrl = @"~/Account/Login.aspx";
        }

        protected void LinkButtonNationList_Click(object sender, EventArgs e)
        {
            Response.Redirect(@"~/Admin/NationList.aspx?Language=Farsi");
        }

        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            Response.Redirect(@"~/Admin/EditSelectedNation.aspx");
        }

     

        protected void LinkButtonLogin_Click(object sender, EventArgs e)
        {
            LinkButton lbtn = (LinkButton)sender;
            if (UserIdentity.Autenticated)
            {
                UserIdentity.SetAuthentication(false);
                Response.Redirect(@"~/Account/Login.aspx");
            }
        }
    }
}